package main

import (
	"flag"
	"fmt"
	"os"
	"strings"
)

var noNl = flag.Bool("n", false, "suppress trailing newline")

func usage() {
	fmt.Fprint(os.Stderr, "usage: echo [ -n ] arg ...\n")
	os.Exit(2)
}

func main() {
	flag.Usage = usage
	flag.Parse()
	fmt.Print(strings.Join(flag.Args(), " "))
	if !*noNl {
		fmt.Println()
	}
	os.Exit(0)
}
